class Popsicle < ActiveRecord::Base	
	validates :type, :presence => true
	before_create :check_stream_or_entity_id_exist
	
	def check_stream_or_entity_id_exist
		if ((self.stream_id != nil) ^ (self.entity_id != nil))
			return true
		else
			return false
		end
	end
end
